package com.jinzecloud.reportapproval.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jinzecloud.reportapproval.utils.PageUtils;
import com.jinzecloud.reportapproval.utils.Query;

import com.jinzecloud.reportapproval.mapper.VegetationChildMapper;
import com.jinzecloud.reportapproval.bean.VegetationChild;
import com.jinzecloud.reportapproval.service.VegetationChildService;


@Service("vegetationChildService")
public class VegetationChildServiceImpl extends ServiceImpl<VegetationChildMapper, VegetationChild> implements VegetationChildService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<VegetationChild> page = this.page(
                new Query<VegetationChild>().getPage(params),
                new QueryWrapper<VegetationChild>().like("project_code", params.get("key")).orderByDesc("id")
        );

        return new PageUtils(page);
    }

}